-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Mixed DataFrame with Extension Array incorrect aggregation #35112
Conversation
simonjayhawkins
commented
Jul 3, 2020
- closes BUG: Mixed DataFrame with Extension Array incorrect aggregation #34520 by reverting REF: move mixed-dtype frame_apply check outside of _reduce try/except #32950
…y/except (pandas-dev#32950)" This reverts commit b838508.
try: | ||
result = f(values) | ||
|
||
except TypeError: | ||
# e.g. in nanops trying to convert strs to float | ||
|
||
# try by-column first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this need to be moved? if it is moved, then the "try by-column first" comment is no longer accurate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "try by-column first" comment is no longer accurate
This comment was there originally before the move in https://github.com/pandas-dev/pandas/pull/32950/files.
why does this need to be moved?
This PR reverts a change that caused a regression. The PR that caused the regression is labelled as a clean. This PR is in response to #34730 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, here, @jbrockmendel ok with this? (certainly can follow up with a cleanup PR)
ping @jbrockmendel |
def test_mixed_frame_with_integer_sum(): | ||
# https://github.com/pandas-dev/pandas/issues/34520 | ||
df = pd.DataFrame([["a", 1]], columns=list("ab")) | ||
df.astype({"b": "Int64"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be df = df.astype
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
I think there are better fixes available. The underlying problem is that we're calling |
closing in favour of #32867 |